package cn.caskm.souvenirshopsystem.service;

import cn.caskm.souvenirshopsystem.domain.Result;
import cn.caskm.souvenirshopsystem.domain.dto.PageDTO;
import cn.caskm.souvenirshopsystem.domain.po.Announcement;
import cn.caskm.souvenirshopsystem.domain.query.AnnouncementQuery;
import cn.caskm.souvenirshopsystem.domain.vo.AnnouncementVO;
import com.baomidou.mybatisplus.extension.service.IService;

public interface AnnouncementService extends IService<Announcement> {

    /**
     * 分页查询公告
     */
    Result<PageDTO<AnnouncementVO>> page(AnnouncementQuery query);

    /**
     * 获取公告详情
     */
    Result<AnnouncementVO> detail(Integer announcementId);

    /**
     * 发布公告
     */
    Result<Void> publishAnnouncement(Announcement announcement);

    /**
     * 更新公告
     */
    Result<Void> updateAnnouncement(Announcement announcement);

    /**
     * 删除公告
     */
    Result<Void> deleteAnnouncement(Integer announcementId);

    /**
     * 更新公告状态
     */
    Result<Void> updateStatus(Integer announcementId, String status);

    /**
     * 置顶/取消置顶
     */
    Result<Void> updateTop(Integer announcementId, String isTop);

}
